@extends('admin::layouts.master')
@section('content')
    <div class="card" id="app">
        <div class="card-header">微信管理</div>
        <ul role="tablist" class="nav nav-tabs">
            <li class="nav-item"><a href="/wachat/weixin" class="nav-link">微信配置列表</a></li>
            <li class="nav-item"><a href="javascript:halt();" class="nav-link active">添加微信配置</a></li>
        </ul>
        <form action="/wachat/weixin" method="post">
            <div class="card-body card-body-contrast">
                @csrf
                <div class="form-group row">
                    <label for="appid" class="col-12 col-sm-3 col-form-label text-md-right">appid</label>
                    <div class="col-12 col-md-9">
                        <input id="appid" name="appid" type="text"
                               value="{{ $data['appid']??old('appid') }}"
                               placeholder="请输入appid"
                               class="form-control form-control-sm form-control{{ $errors->has('appid') ? ' is-invalid' : '' }}">
                        @if ($errors->has('appid'))
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $errors->first('appid') }}</strong>
                            </span>
                        @endif
                    </div>
                </div>
                <div class="form-group row">
                    <label for="appsecret" class="col-12 col-sm-3 col-form-label text-md-right">appsecret</label>
                    <div class="col-12 col-md-9">
                        <input id="appsecret" name="appsecret" type="text"
                               value="{{ $data['appsecret']??old('appsecret') }}"
                               placeholder="请输入appsecret"
                               class="form-control form-control-sm form-control{{ $errors->has('appsecret') ? ' is-invalid' : '' }}">
                        @if ($errors->has('appsecret'))
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $errors->first('appsecret') }}</strong>
                            </span>
                        @endif
                    </div>
                </div>
                <div class="form-group row">
                    <label for="encodingaeskey" class="col-12 col-sm-3 col-form-label text-md-right">encodingaeskey</label>
                    <div class="col-12 col-md-9">
                        <input id="encodingaeskey" name="encodingaeskey" type="text"
                               value="{{ $data['encodingaeskey']??old('encodingaeskey') }}"
                               placeholder="请输入encodingaeskey"
                               class="form-control form-control-sm form-control{{ $errors->has('encodingaeskey') ? ' is-invalid' : '' }}">
                        @if ($errors->has('encodingaeskey'))
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $errors->first('encodingaeskey') }}</strong>
                            </span>
                        @endif
                    </div>
                </div>
                <div class="form-group row">
                    <label for="token" class="col-12 col-sm-3 col-form-label text-md-right">token</label>
                    <div class="col-12 col-md-9">
                        <input id="token" name="token" type="text"
                               value="{{ $data['token']??old('token') }}"
                               placeholder="请输入token"
                               class="form-control form-control-sm form-control{{ $errors->has('token') ? ' is-invalid' : '' }}">
                        @if ($errors->has('token'))
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $errors->first('token') }}</strong>
                            </span>
                        @endif
                    </div>
                </div>
            </div>
            <div class="card-footer text-muted">
                <button type="submit" class="btn btn-primary btn-lg btn-block">保存</button>
            </div>
        </form>
    </div>
@endsection
